package com.jk.lesson3;

import java.util.function.Function;
import java.util.function.IntPredicate;

/**
 * Created by Auser on 2016/11/10.
 */
public class FunctionComplexTest {
    public static void main(String...args){
        Function<Integer, Integer> f = x -> x + 1;
        Function<Integer, Integer> g = x -> x * 2;
        Function<Integer, Integer> h = f.andThen(g);
        int res = h.apply(1);
        System.out.println(res);

        IntPredicate i = value -> value == 0;
    }
}
